package com.dao;

import com.bean.Payment;

import java.sql.SQLException;
import java.util.List;

public interface PaymentDAO {

    /**
     * BeanListHandler将结果列表封装
     *
     * @return
     * @throws SQLException
     */
     List<Payment> selectAll() throws SQLException ;
    /**
     * BeanHandler将单个列表封装
     *查询余额和时间
     * @param
     * @return
     * @throws SQLException
     */
     List<Payment> selectById(String ownerId, String paymentType) throws SQLException ;

     List<Payment> selectByName(String ownerId) throws SQLException ;

     boolean deleteById(Integer id) throws SQLException ;

     boolean deleteAll(String[] idsArr) throws SQLException ;

     boolean insert(Payment p) throws SQLException ;

    /**
     * ScalarHandler用来将单个Object类型封装
     *
     * @return
     * @throws SQLException
     */
     Integer count() throws SQLException ;

     Integer countSearch(String search) throws SQLException ;

     List<Payment> selectAllPagination(Integer offset, Integer limit) throws SQLException ;

     List<Payment> selectAllPaginationSearch(Integer offset, Integer limit, String search) throws SQLException ;

}
